3.4.77 \(\int \frac {4-3 \tan (a+b x)}{\sqrt {4+3 \tan (a+b x)}} \, dx\) [377]

3.4.77.1 Optimal result
3.4.77.2 Mathematica [C] (verified)
3.4.77.3 Rubi [A] (verified)
3.4.77.4 Maple [A] (verified)
3.4.77.5 Fricas [B] (verification not implemented)
3.4.77.6 Sympy [F]
3.4.77.7 Maxima [F]
3.4.77.8 Giac [F(-1)]
3.4.77.9 Mupad [B] (verification not implemented)

3.4.77.1 Optimal result

Integrand size = 25, antiderivative size = 85 \[ \int \frac {4-3 \tan (a+b x)}{\sqrt {4+3 \tan (a+b x)}} \, dx=-\frac {9 \arctan \left (\frac {1-3 \tan (a+b x)}{\sqrt {2} \sqrt {4+3 \tan (a+b x)}}\right )}{5 \sqrt {2} b}+\frac {13 \text {arctanh}\left (\frac {3+\tan (a+b x)}{\sqrt {2} \sqrt {4+3 \tan (a+b x)}}\right )}{5 \sqrt {2} b} \]

output
-9/10*arctan(1/2*(1-3*tan(b*x+a))*2^(1/2)/(4+3*tan(b*x+a))^(1/2))/b*2^(1/2 
)+13/10*arctanh(1/2*(3+tan(b*x+a))*2^(1/2)/(4+3*tan(b*x+a))^(1/2))/b*2^(1/ 
2)
 
3.4.77.2 Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 0.11 (sec) , antiderivative size = 75, normalized size of antiderivative = 0.88 \[ \int \frac {4-3 \tan (a+b x)}{\sqrt {4+3 \tan (a+b x)}} \, dx=\frac {(3-4 i) \text {arctanh}\left (\frac {\sqrt {4+3 \tan (a+b x)}}{\sqrt {4-3 i}}\right )}{\sqrt {4-3 i} b}+\frac {(3+4 i) \text {arctanh}\left (\frac {\sqrt {4+3 \tan (a+b x)}}{\sqrt {4+3 i}}\right )}{\sqrt {4+3 i} b} \]

input
Integrate[(4 - 3*Tan[a + b*x])/Sqrt[4 + 3*Tan[a + b*x]],x]
 
output
((3 - 4*I)*ArcTanh[Sqrt[4 + 3*Tan[a + b*x]]/Sqrt[4 - 3*I]])/(Sqrt[4 - 3*I] 
*b) + ((3 + 4*I)*ArcTanh[Sqrt[4 + 3*Tan[a + b*x]]/Sqrt[4 + 3*I]])/(Sqrt[4 
+ 3*I]*b)
 
3.4.77.3 Rubi [A] (verified)

Time = 0.38 (sec) , antiderivative size = 85, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.280, Rules used = {3042, 4019, 27, 3042, 4018, 216, 220}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {4-3 \tan (a+b x)}{\sqrt {3 \tan (a+b x)+4}} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {4-3 \tan (a+b x)}{\sqrt {3 \tan (a+b x)+4}}dx\)

\(\Big \downarrow \) 4019

\(\displaystyle \frac {1}{10} \int \frac {9 (\tan (a+b x)+3)}{\sqrt {3 \tan (a+b x)+4}}dx-\frac {1}{10} \int -\frac {13 (1-3 \tan (a+b x))}{\sqrt {3 \tan (a+b x)+4}}dx\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {13}{10} \int \frac {1-3 \tan (a+b x)}{\sqrt {3 \tan (a+b x)+4}}dx+\frac {9}{10} \int \frac {\tan (a+b x)+3}{\sqrt {3 \tan (a+b x)+4}}dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {13}{10} \int \frac {1-3 \tan (a+b x)}{\sqrt {3 \tan (a+b x)+4}}dx+\frac {9}{10} \int \frac {\tan (a+b x)+3}{\sqrt {3 \tan (a+b x)+4}}dx\)

\(\Big \downarrow \) 4018

\(\displaystyle -\frac {9 \int \frac {1}{\frac {(1-3 \tan (a+b x))^2}{3 \tan (a+b x)+4}+2}d\frac {1-3 \tan (a+b x)}{\sqrt {3 \tan (a+b x)+4}}}{5 b}-\frac {117 \int \frac {1}{\frac {81 (\tan (a+b x)+3)^2}{3 \tan (a+b x)+4}-162}d\frac {9 (\tan (a+b x)+3)}{\sqrt {3 \tan (a+b x)+4}}}{5 b}\)

\(\Big \downarrow \) 216

\(\displaystyle -\frac {117 \int \frac {1}{\frac {81 (\tan (a+b x)+3)^2}{3 \tan (a+b x)+4}-162}d\frac {9 (\tan (a+b x)+3)}{\sqrt {3 \tan (a+b x)+4}}}{5 b}-\frac {9 \arctan \left (\frac {1-3 \tan (a+b x)}{\sqrt {2} \sqrt {3 \tan (a+b x)+4}}\right )}{5 \sqrt {2} b}\)

\(\Big \downarrow \) 220

\(\displaystyle \frac {13 \text {arctanh}\left (\frac {\tan (a+b x)+3}{\sqrt {2} \sqrt {3 \tan (a+b x)+4}}\right )}{5 \sqrt {2} b}-\frac {9 \arctan \left (\frac {1-3 \tan (a+b x)}{\sqrt {2} \sqrt {3 \tan (a+b x)+4}}\right )}{5 \sqrt {2} b}\)

input
Int[(4 - 3*Tan[a + b*x])/Sqrt[4 + 3*Tan[a + b*x]],x]
 
output
(-9*ArcTan[(1 - 3*Tan[a + b*x])/(Sqrt[2]*Sqrt[4 + 3*Tan[a + b*x]])])/(5*Sq 
rt[2]*b) + (13*ArcTanh[(3 + Tan[a + b*x])/(Sqrt[2]*Sqrt[4 + 3*Tan[a + b*x] 
])])/(5*Sqrt[2]*b)
 

3.4.77.3.1 Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 216
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A 
rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a 
, 0] || GtQ[b, 0])
 

rule 220
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[b, 2])^(- 
1))*ArcTanh[Rt[b, 2]*(x/Rt[-a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && 
 (LtQ[a, 0] || GtQ[b, 0])
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4018
Int[((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])/Sqrt[(a_) + (b_.)*tan[(e_.) + ( 
f_.)*(x_)]], x_Symbol] :> Simp[-2*(d^2/f)   Subst[Int[1/(2*b*c*d - 4*a*d^2 
+ x^2), x], x, (b*c - 2*a*d - b*d*Tan[e + f*x])/Sqrt[a + b*Tan[e + f*x]]], 
x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0 
] && NeQ[c^2 + d^2, 0] && EqQ[2*a*c*d - b*(c^2 - d^2), 0]
 

rule 4019
Int[((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])/Sqrt[(a_) + (b_.)*tan[(e_.) + ( 
f_.)*(x_)]], x_Symbol] :> With[{q = Rt[a^2 + b^2, 2]}, Simp[1/(2*q)   Int[( 
a*c + b*d + c*q + (b*c - a*d + d*q)*Tan[e + f*x])/Sqrt[a + b*Tan[e + f*x]], 
 x], x] - Simp[1/(2*q)   Int[(a*c + b*d - c*q + (b*c - a*d - d*q)*Tan[e + f 
*x])/Sqrt[a + b*Tan[e + f*x]], x], x]] /; FreeQ[{a, b, c, d, e, f}, x] && N 
eQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && NeQ[2*a*c*d - 
 b*(c^2 - d^2), 0] && NiceSqrtQ[a^2 + b^2]
 
3.4.77.4 Maple [A] (verified)

Time = 0.23 (sec) , antiderivative size = 134, normalized size of antiderivative = 1.58

method result size
derivativedivides \(\frac {\frac {13 \sqrt {2}\, \ln \left (9+3 \tan \left (b x +a \right )+3 \sqrt {4+3 \tan \left (b x +a \right )}\, \sqrt {2}\right )}{20}+\frac {9 \sqrt {2}\, \arctan \left (\frac {\left (2 \sqrt {4+3 \tan \left (b x +a \right )}+3 \sqrt {2}\right ) \sqrt {2}}{2}\right )}{10}-\frac {13 \sqrt {2}\, \ln \left (9+3 \tan \left (b x +a \right )-3 \sqrt {4+3 \tan \left (b x +a \right )}\, \sqrt {2}\right )}{20}+\frac {9 \sqrt {2}\, \arctan \left (\frac {\left (2 \sqrt {4+3 \tan \left (b x +a \right )}-3 \sqrt {2}\right ) \sqrt {2}}{2}\right )}{10}}{b}\) \(134\)
default \(\frac {\frac {13 \sqrt {2}\, \ln \left (9+3 \tan \left (b x +a \right )+3 \sqrt {4+3 \tan \left (b x +a \right )}\, \sqrt {2}\right )}{20}+\frac {9 \sqrt {2}\, \arctan \left (\frac {\left (2 \sqrt {4+3 \tan \left (b x +a \right )}+3 \sqrt {2}\right ) \sqrt {2}}{2}\right )}{10}-\frac {13 \sqrt {2}\, \ln \left (9+3 \tan \left (b x +a \right )-3 \sqrt {4+3 \tan \left (b x +a \right )}\, \sqrt {2}\right )}{20}+\frac {9 \sqrt {2}\, \arctan \left (\frac {\left (2 \sqrt {4+3 \tan \left (b x +a \right )}-3 \sqrt {2}\right ) \sqrt {2}}{2}\right )}{10}}{b}\) \(134\)
parts \(-\frac {\sqrt {2}\, \ln \left (9+3 \tan \left (b x +a \right )-3 \sqrt {4+3 \tan \left (b x +a \right )}\, \sqrt {2}\right )}{5 b}+\frac {6 \sqrt {2}\, \arctan \left (\frac {\left (2 \sqrt {4+3 \tan \left (b x +a \right )}-3 \sqrt {2}\right ) \sqrt {2}}{2}\right )}{5 b}+\frac {\sqrt {2}\, \ln \left (9+3 \tan \left (b x +a \right )+3 \sqrt {4+3 \tan \left (b x +a \right )}\, \sqrt {2}\right )}{5 b}+\frac {6 \sqrt {2}\, \arctan \left (\frac {\left (2 \sqrt {4+3 \tan \left (b x +a \right )}+3 \sqrt {2}\right ) \sqrt {2}}{2}\right )}{5 b}-\frac {3 \left (\frac {3 \sqrt {2}\, \ln \left (9+3 \tan \left (b x +a \right )-3 \sqrt {4+3 \tan \left (b x +a \right )}\, \sqrt {2}\right )}{20}+\frac {\sqrt {2}\, \arctan \left (\frac {\left (2 \sqrt {4+3 \tan \left (b x +a \right )}-3 \sqrt {2}\right ) \sqrt {2}}{2}\right )}{10}-\frac {3 \sqrt {2}\, \ln \left (9+3 \tan \left (b x +a \right )+3 \sqrt {4+3 \tan \left (b x +a \right )}\, \sqrt {2}\right )}{20}+\frac {\sqrt {2}\, \arctan \left (\frac {\left (2 \sqrt {4+3 \tan \left (b x +a \right )}+3 \sqrt {2}\right ) \sqrt {2}}{2}\right )}{10}\right )}{b}\) \(276\)

input
int((4-3*tan(b*x+a))/(4+3*tan(b*x+a))^(1/2),x,method=_RETURNVERBOSE)
 
output
1/b*(13/20*2^(1/2)*ln(9+3*tan(b*x+a)+3*(4+3*tan(b*x+a))^(1/2)*2^(1/2))+9/1 
0*2^(1/2)*arctan(1/2*(2*(4+3*tan(b*x+a))^(1/2)+3*2^(1/2))*2^(1/2))-13/20*2 
^(1/2)*ln(9+3*tan(b*x+a)-3*(4+3*tan(b*x+a))^(1/2)*2^(1/2))+9/10*2^(1/2)*ar 
ctan(1/2*(2*(4+3*tan(b*x+a))^(1/2)-3*2^(1/2))*2^(1/2)))
 
3.4.77.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 309 vs. \(2 (71) = 142\).

Time = 0.25 (sec) , antiderivative size = 309, normalized size of antiderivative = 3.64 \[ \int \frac {4-3 \tan (a+b x)}{\sqrt {4+3 \tan (a+b x)}} \, dx=-\frac {1}{10} \, \sqrt {\frac {117 \, b^{2} \sqrt {-\frac {1}{b^{4}}} + 44}{b^{2}}} \log \left (\frac {1}{5} \, {\left (7 \, b^{3} \sqrt {-\frac {1}{b^{4}}} - 24 \, b\right )} \sqrt {\frac {117 \, b^{2} \sqrt {-\frac {1}{b^{4}}} + 44}{b^{2}}} + 25 \, \sqrt {3 \, \tan \left (b x + a\right ) + 4}\right ) + \frac {1}{10} \, \sqrt {\frac {117 \, b^{2} \sqrt {-\frac {1}{b^{4}}} + 44}{b^{2}}} \log \left (-\frac {1}{5} \, {\left (7 \, b^{3} \sqrt {-\frac {1}{b^{4}}} - 24 \, b\right )} \sqrt {\frac {117 \, b^{2} \sqrt {-\frac {1}{b^{4}}} + 44}{b^{2}}} + 25 \, \sqrt {3 \, \tan \left (b x + a\right ) + 4}\right ) + \frac {1}{10} \, \sqrt {-\frac {117 \, b^{2} \sqrt {-\frac {1}{b^{4}}} - 44}{b^{2}}} \log \left (\frac {1}{5} \, {\left (7 \, b^{3} \sqrt {-\frac {1}{b^{4}}} + 24 \, b\right )} \sqrt {-\frac {117 \, b^{2} \sqrt {-\frac {1}{b^{4}}} - 44}{b^{2}}} + 25 \, \sqrt {3 \, \tan \left (b x + a\right ) + 4}\right ) - \frac {1}{10} \, \sqrt {-\frac {117 \, b^{2} \sqrt {-\frac {1}{b^{4}}} - 44}{b^{2}}} \log \left (-\frac {1}{5} \, {\left (7 \, b^{3} \sqrt {-\frac {1}{b^{4}}} + 24 \, b\right )} \sqrt {-\frac {117 \, b^{2} \sqrt {-\frac {1}{b^{4}}} - 44}{b^{2}}} + 25 \, \sqrt {3 \, \tan \left (b x + a\right ) + 4}\right ) \]

input
integrate((4-3*tan(b*x+a))/(4+3*tan(b*x+a))^(1/2),x, algorithm="fricas")
 
output
-1/10*sqrt((117*b^2*sqrt(-1/b^4) + 44)/b^2)*log(1/5*(7*b^3*sqrt(-1/b^4) - 
24*b)*sqrt((117*b^2*sqrt(-1/b^4) + 44)/b^2) + 25*sqrt(3*tan(b*x + a) + 4)) 
 + 1/10*sqrt((117*b^2*sqrt(-1/b^4) + 44)/b^2)*log(-1/5*(7*b^3*sqrt(-1/b^4) 
 - 24*b)*sqrt((117*b^2*sqrt(-1/b^4) + 44)/b^2) + 25*sqrt(3*tan(b*x + a) + 
4)) + 1/10*sqrt(-(117*b^2*sqrt(-1/b^4) - 44)/b^2)*log(1/5*(7*b^3*sqrt(-1/b 
^4) + 24*b)*sqrt(-(117*b^2*sqrt(-1/b^4) - 44)/b^2) + 25*sqrt(3*tan(b*x + a 
) + 4)) - 1/10*sqrt(-(117*b^2*sqrt(-1/b^4) - 44)/b^2)*log(-1/5*(7*b^3*sqrt 
(-1/b^4) + 24*b)*sqrt(-(117*b^2*sqrt(-1/b^4) - 44)/b^2) + 25*sqrt(3*tan(b* 
x + a) + 4))
 
3.4.77.6 Sympy [F]

\[ \int \frac {4-3 \tan (a+b x)}{\sqrt {4+3 \tan (a+b x)}} \, dx=- \int \frac {3 \tan {\left (a + b x \right )}}{\sqrt {3 \tan {\left (a + b x \right )} + 4}}\, dx - \int \left (- \frac {4}{\sqrt {3 \tan {\left (a + b x \right )} + 4}}\right )\, dx \]

input
integrate((4-3*tan(b*x+a))/(4+3*tan(b*x+a))**(1/2),x)
 
output
-Integral(3*tan(a + b*x)/sqrt(3*tan(a + b*x) + 4), x) - Integral(-4/sqrt(3 
*tan(a + b*x) + 4), x)
 
3.4.77.7 Maxima [F]

\[ \int \frac {4-3 \tan (a+b x)}{\sqrt {4+3 \tan (a+b x)}} \, dx=\int { -\frac {3 \, \tan \left (b x + a\right ) - 4}{\sqrt {3 \, \tan \left (b x + a\right ) + 4}} \,d x } \]

input
integrate((4-3*tan(b*x+a))/(4+3*tan(b*x+a))^(1/2),x, algorithm="maxima")
 
output
-integrate((3*tan(b*x + a) - 4)/sqrt(3*tan(b*x + a) + 4), x)
 
3.4.77.8 Giac [F(-1)]

Timed out. \[ \int \frac {4-3 \tan (a+b x)}{\sqrt {4+3 \tan (a+b x)}} \, dx=\text {Timed out} \]

input
integrate((4-3*tan(b*x+a))/(4+3*tan(b*x+a))^(1/2),x, algorithm="giac")
 
output
Timed out
 
3.4.77.9 Mupad [B] (verification not implemented)

Time = 8.94 (sec) , antiderivative size = 147, normalized size of antiderivative = 1.73 \[ \int \frac {4-3 \tan (a+b x)}{\sqrt {4+3 \tan (a+b x)}} \, dx=\mathrm {atan}\left (\frac {b\,\sqrt {\frac {-\frac {16}{25}-\frac {12}{25}{}\mathrm {i}}{b^2}}\,\sqrt {3\,\mathrm {tan}\left (a+b\,x\right )+4}}{2}\right )\,\sqrt {\frac {-\frac {16}{25}-\frac {12}{25}{}\mathrm {i}}{b^2}}\,2{}\mathrm {i}-\mathrm {atan}\left (\frac {b\,\sqrt {\frac {-\frac {16}{25}+\frac {12}{25}{}\mathrm {i}}{b^2}}\,\sqrt {3\,\mathrm {tan}\left (a+b\,x\right )+4}}{2}\right )\,\sqrt {\frac {-\frac {16}{25}+\frac {12}{25}{}\mathrm {i}}{b^2}}\,2{}\mathrm {i}+2\,\mathrm {atanh}\left (\frac {2\,b\,\sqrt {\frac {\frac {9}{25}-\frac {27}{100}{}\mathrm {i}}{b^2}}\,\sqrt {3\,\mathrm {tan}\left (a+b\,x\right )+4}}{3}\right )\,\sqrt {\frac {\frac {9}{25}-\frac {27}{100}{}\mathrm {i}}{b^2}}+2\,\mathrm {atanh}\left (\frac {2\,b\,\sqrt {\frac {\frac {9}{25}+\frac {27}{100}{}\mathrm {i}}{b^2}}\,\sqrt {3\,\mathrm {tan}\left (a+b\,x\right )+4}}{3}\right )\,\sqrt {\frac {\frac {9}{25}+\frac {27}{100}{}\mathrm {i}}{b^2}} \]

input
int(-(3*tan(a + b*x) - 4)/(3*tan(a + b*x) + 4)^(1/2),x)
 
output
atan((b*((- 16/25 - 12i/25)/b^2)^(1/2)*(3*tan(a + b*x) + 4)^(1/2))/2)*((- 
16/25 - 12i/25)/b^2)^(1/2)*2i - atan((b*((- 16/25 + 12i/25)/b^2)^(1/2)*(3* 
tan(a + b*x) + 4)^(1/2))/2)*((- 16/25 + 12i/25)/b^2)^(1/2)*2i + 2*atanh((2 
*b*((9/25 - 27i/100)/b^2)^(1/2)*(3*tan(a + b*x) + 4)^(1/2))/3)*((9/25 - 27 
i/100)/b^2)^(1/2) + 2*atanh((2*b*((9/25 + 27i/100)/b^2)^(1/2)*(3*tan(a + b 
*x) + 4)^(1/2))/3)*((9/25 + 27i/100)/b^2)^(1/2)